home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
pc
/
pr42sdk
/
examples
/
headers
/
premiere.h
< prev
Wrap
C/C++ Source or Header
|
1996-03-28
|
32KB
|
882 lines
//=============================================================================
//
// Premiere.h
//
// Part of the Adobe Premiere 4.2 Plug-in Developer's Toolkit.
//
// Copyright 1993-96, Adobe Systems Incorporated, all rights reserved worldwide.
//
//-----------------------------------------------------------------------------
// Microsoft is checking for the window class from 16-bit Premiere
// ("DemonMain"), and turning off DirectVideo if it finds it.
#define PREMWNDCLASS "DemonMain32"
// ---------------------------------------------------------------------
// Basic types
typedef char *Ptr;
typedef Ptr *Handle; /* pointer to a master pointer */
typedef long Fixed; /* fixed point arithmatic type */
typedef unsigned char Boolean;
typedef long (*ProcPtr)();
typedef ProcPtr *ProcHandle;
typedef unsigned char Str255[256],Str63[64],Str32[33],Str31[32],Str27[28],Str15[16],*StringPtr,**StringHandle;
typedef const unsigned char *ConstStr255Param;
typedef ConstStr255Param ConstStr63Param,ConstStr32Param,ConstStr31Param,
ConstStr27Param,ConstStr15Param;
typedef short OSErr; /* error code */
typedef unsigned long OSType;
typedef OSType *OSTypePtr;
typedef unsigned long ResType;
typedef ResType *ResTypePtr;
typedef unsigned char Style;
// ---------------------------------------------------------------------
// preprocessor macros
#ifdef pascal
#undef pascal
#endif
#define pascal
#ifndef NULL
#define NULL 0
#endif
#define nil 0
#define noErr 0 /*All is well*/
#ifndef false
#define false 0
#endif
#ifndef true
#define true 1
#endif
// ---------------------------------------------------------------------
// basic structures
// ---------------------------------------------------------------------
// Special long word based rect and point
typedef struct {
long top;
long left;
long bottom;
long right;
} LongRect;
typedef struct {
long y;
long x;
} LongPoint;
// File spec record
struct FSSpec {
short vRefNum;
long parID;
char name[_MAX_PATH];
};
typedef struct FSSpec FSSpec;
typedef FSSpec *FSSpecPtr, **FSSpecHandle;
// video frame record, 32 bits/pixel
// All internal buffers are in this format
//
// Pixel buffer pointed to by *pix is same as a DIB buffer:
// BGRA, origin at lower left.
//
// 4.2 changes -- njs
typedef struct
{
RECT bounds; // bounds of pixmap
int rowbytes; // rowbytes of data
int bitsperpixel; // bits per pixels. in 4.2 or earlier, always 32
int pixelformat; // storage format. Future expansion. In 4.2 or earlier, always 0 (RGB)
char *pix; // pointer to pixel buffer
long reserved[4];
} PPix, *PPixPtr, **PPixHand;
/*
typedef struct
{
DWORD size; // size of header+pix
RECT bounds; // bounds of pixmap
short rowbytes; // rowbytes of BGRA data
short unused; // padding so struct is 16 bytes
char data[1]; // data follows: BGRA
} PPix, *PPixPtr, **PPixHand;
// == 16(+1) bytes
*/
typedef short PWorldID;
// ---------------------------------------------------------------------
// Replaceable Bottleneck routines and definitions
// ---------------------------------------------------------------------
typedef void (*StretchBitsPtr)(PPixPtr srcPix, PPixPtr dstPix, LPRECT srcRect,
LPRECT dstRect, short mode, HANDLE rgn);
typedef void (*AudStretchPtr)(Ptr src, long srclen, Ptr dest, long destlen, UINT flags);
typedef void (*AudMixPtr)(Ptr buf1, long v1, Ptr buf2, long v2, Ptr buf3, long v3,
long width, Ptr dest, UINT flags);
typedef void (*AudLimitPtr)(Ptr src, Ptr dest, long width, UINT flags, long total);
typedef void (*AudSumPtr)(Ptr src, Ptr dest, long width, long scale, UINT flags, long part, long total);
typedef void (*DistortPolygonPtr)(PPixHand src, PPixHand dest, RECT *srcbox, Point *dstpts);
typedef void (*DistortFixedPolygonPtr)(PPixHand src, PPixHand dest, RECT *srcbox, LongPoint *dstpts);
typedef void (*PolyToPolyPtr)(PPixHand src, PPixHand dest, Point *srcpts, Point *dstpts);
typedef void (*FixedToFixedPtr)(PPixHand src, PPixHand dest, LongPoint *srcpts, LongPoint *dstpts);
typedef void (*ImageKeyPtr)(PPixHand src, PPixHand dest, PPixHand work,
Ptr workbuf, unsigned short level, void *therec);
typedef struct {
short count; // number of routines
short reserved[14];
StretchBitsPtr StretchBits;
DistortPolygonPtr DistortPolygon;
PolyToPolyPtr MapPolygon;
AudStretchPtr AudioStretch;
AudMixPtr AudioMix;
AudSumPtr AudioSum;
AudLimitPtr AudioLimit;
DistortFixedPolygonPtr DistortFixed;
FixedToFixedPtr FixedToFixed;
ImageKeyPtr ImageKey;
long unused[3];
} BottleRec;
enum {
bnReplace = 0
};
typedef void (*BottleProc)(short selector, BottleRec *therec);
// modes for StretchBits bottleneck
#define cbBlend 0x8000
#define cbInterp 0x4000
#define cbMaskHdl 0x2000
typedef struct {
Ptr srcPtr; // Pointer to total source block
long srcSampleOffset; // Offset to important part of source (in samps)
long srcTotalSampleCount; // Total samples in source block
long srcSampleCount; // Len of this part of source block (in samples)
short srcFlags; // Format of source block
Ptr dstPtr; // Pointer to destination block
long dstSampleCount; // Len of destination block (in samples)
short dstFlags; // Format of destination block
long srcRate;
long dstRate;
long prevDstSamples;
long prevSrcSamples;
} ResampleRec;
typedef struct {
Ptr srcPtr;
long srcSampleCount;
short srcFlags;
Ptr dstPtr;
long dstSampleCount;
short dstFlags;
long convertOffset;
long step;
} AudioMungeRec;
// ---------------------------------------------------------------------
// Transition / Filter records & types
// ---------------------------------------------------------------------
// field flags for transitions
enum {
gvHalfV = 0x0800,
gvHalfH = 0x0400,
gvFieldsOdd = 0x0200,
gvFieldsEven = 0x0100,
};
typedef short (*FXCallBackProcPtr)(long frame, short track,
PPixHand thePort, RECT *theBox, Handle privateData);
// Transition Data Structure
typedef struct {
Handle specsHandle;
// void *specData; // Filter data -- windows GlobalPtr
// int specsize; // size of filter data
PPixHand source1; // source pixels 1
PPixHand source2; // source pixels 2
PPixHand destination; // Destination pixels
long part; // part / total = % complete
long total;
char previewing; // in preview mode?
unsigned char arrowFlags; // flags for direction arrows
char reverse; // is effect being reversed?
char source; // are sources swapped?
POINT start; // starting point for effect
POINT end; // ending point for effect
POINT center; // the reference center point
void *privateData; // Editor private data handle
FXCallBackProcPtr callBack; // callback, not valid if nil
BottleRec *bottleNecks; // botleneck callback routines
short version;
short sizeFlags;
long flags;
short fps;
} EffectRecord, **EffectHandle;
typedef struct {
EffectRecord common; // common fields;
BITMAPINFOHEADER src1binfo; // compressed source 1 description
char *src1data; // compressed source 1 data
long src1size; // compressed source 1 data size
BITMAPINFOHEADER src2binfo; // compressed source 2 description
char *src2data; // compressed source 2 data
long src2size; // compressed source 2 data size
BITMAPINFOHEADER dstbinfo; // compressed source 2 description
char *dstdata; // output frame buffer
DWORD framesize; // returned output frame size
long reqsize; // requested data size (0 = don't care)
long reqquality; // requested frame quality (0-100%)
} DirectEffectRecord, **DirectHandle;
// Selector messages
enum {
esExecute = 0,
esSetup,
esAbout,
esCanHandleComp,
esProcessComp
};
// Effect Corner Bits
enum {
bitTop = 0x01,
bitRight = 0x02,
bitBottom = 0x04,
bitLeft = 0x08,
bitUpperRight = 0x10,
bitLowerRight = 0x20,
bitLowerLeft = 0x40,
bitUpperLeft = 0x80
};
// Filter callback prototype
typedef short (CALLBACK *VFilterCallBackProcPtr)(long frame,
PPixHand thePort,RECT *theBox, Handle privateData);
typedef short (CALLBACK *AFilterCallBackProcPtr)(long sample, long count,
Ptr buffer, Handle privateData);
// Video Filter Data Structure
typedef struct {
Handle specsHandle;
// void *specData; // Filter data -- windows GlobalPtr
// int specsize; // size of filter data
PPixHand source;
PPixHand destination;
long part;
long total;
char previewing;
void *privateData;
VFilterCallBackProcPtr callBack;
BottleRec *bottleNecks;
short version;
short sizeFlags;
long flags;
short fps;
long instanceData; // 4.2 changes -- njs
} VideoRecord, **VideoHandle;
// Audio Filter data structure
typedef struct {
Handle specsHandle;
// void *specData; // Filter data -- windows GlobalPtr
// int specsize; // size of filter data
Ptr source;
Ptr destination;
long samplenum;
long samplecount;
char previewing;
void *privateData;
AFilterCallBackProcPtr callBack;
long totalsamples;
short flags;
long rate;
BottleRec *bottleNecks;
short version;
long extraFlags;
short fps;
long instanceData; // 4.2 changes -- njs
} AudioRecord, ** AudioFilter;
// Selector messages
enum {
fsExecute = 0,
fsSetup,
fsAbout,
// 4.2 changes -- njs
fsDisposeData
};
//
// These are values for the FltS resource which describes the type of
// storage used in a filter's parameter block.
//
// fltsPhotoPtr A global memory ptr.
// fltsPhotoPtrMac A ptr with the first 4 bytes referencing the
// rest of the data.
// fltsPhotoHand A global memory handle.
// fltsPhotoHandMac A global memory handle with the first 4 bytes
// referencing the rest of the data.
// fltsPhotoDblPtr A ptr to a ptr.
// The first ptr points to an 8-byte block.
// The last 4-bytes of the block contains the marker FOTO_SIG.
// The first 4-bytes contains a ptr to the data.
//
// Use ID 1 for the FltS resource.
//
#define fltsPhotoPtr 0x0001
#define fltsPhotoPtrMac 0x0002
#define fltsPhotoHand 0x0003
#define fltsPhotoHandMac 0x0004
#define fltsPhotoDblPtr 0x0005
#define FOTO_SIG 0x464f544f // 'FOTO'
// ---------------------------------------------------------------------
// Definitions for device control plug-ins
// ---------------------------------------------------------------------
typedef long (*CallBackPtr)();
// Device control calling struct
typedef struct {
Handle deviceData; // private data which the plug-in creates
short command; // command to perform
short mode; // mode command and status
long timecode; // timecode command and status: -1 = N/A, -2 = blank
short timeformat; // 0=non-drop, 1=drop-frame
short timerate; // fps for the timecode above
long features; // feature bits from the features command
short error; // error code from any routine
short preroll; // pre-roll time (secs) for cmdLocate
CallBackPtr callback; // callback for cmdLocate, returns non-zero to stop
ProcPtr PauseProc; // callback to pause current operations
ProcPtr ResumeProc; // callback to restart current operations
char reserved[256]; // reserved;
} DeviceRec, **DeviceHand;
// Calling selectors for device control
enum {
dsInit = 0, // Create any structure(s), pick an operating mode, no dialogs here
dsSetup, // prompt for any user dialogs
dsExecute, // perform command
dsCleanup, // dispose any allocated structure(s)
dsRestart, // re-start any features, used at program startup to reconnect to device
};
// Commands which plug-in can perform
enum {
cmdGetFeatures = 0, // return feature bits
cmdStatus, // fill in current mode and timecode, gets called repeatedly
cmdNewMode, // change to the mode in 'mode'
cmdGoto, // goto the timecode specified in 'timecode'
cmdLocate, // find the timecode in 'timecode' and then return (with deck in play)
cmdShuttle, // shuttle at rate specified in 'mode', from -100 to +100
cmdJogTo, // position at 'timecode', quickly from the current location
cmdJog // Jog at rate specified in 'mode', from -25 to +25 - new in 4.2
};
// Feature bits
#define fStepFwd 0x8000
// can step forward
enum {
fHasJogMode = 0x20000, // device has jog capabilities - new in 4.2
fStepBack = 0x4000, // can step back
fRecord = 0x2000, // can record
fPositionInfo = 0x1000, // returns position info
fGoto = 0x0800, // can seek to a specific frame (fPositionInfo must also be set)
f1_5 = 0x0400, // can play at 1/5 speed
f1_10 = 0x0200, // can play at 1/10 speed
fBasic = 0x0100, // supports Stop,Play,Pause,FastFwd,Rewind
fHasOptions = 0x0080, // plug-in puts up an options dialog
fReversePlay = 0x0040, // supports reverse play
fCanLocate = 0x0020, // can locate a specific timecode
fStillFrame = 0x0010, // device is frame addressable, like a laser disc
fCanShuttle = 0x0008, // supports the Shuttle command
fCanJog = 0x0004 // supports the JogTo command
};
// Mode commands/states
enum {
modeStop = 0,
modePlay,
modePlay1_5,
modePlay1_10,
modePause,
modeFastFwd,
modeRewind,
modeRecord,
modeGoto,
modeStepFwd,
modeStepBack,
modePlayRev,
modePlayRev1_5,
modePlayRev1_10
};
// ---------------------------------------------------------------------
// Utility Routines
// ---------------------------------------------------------------------
// Mac-style memory management calls
typedef long Size; /* size of a block in bytes */
pascal Ptr NewPtr(Size byteCount);
pascal void DisposPtr(Ptr p);
pascal void DisposHandle(Handle h);
pascal Ptr NewPtrClear(Size byteCount);
pascal Handle NewHandleClear(Size byteCount);
pascal Handle NewHandle(Size byteCount);
pascal void SetPtrSize(Ptr FAR *p, Size newSize);
pascal Size GetPtrSize(Ptr p);
pascal void HLock(Handle h);
pascal void HUnlock(Handle h);
pascal Size GetHandleSize(Handle h);
pascal void SetHandleSize(Handle h,Size newSize);
pascal OSErr MemError(void);
pascal void BlockMove(const void *srcPtr,void *destPtr,Size byteCount);
pascal char HGetState(Handle h);
pascal void HSetState(Handle h,char flags);
pascal void HNoPurge(Handle h);
pascal void MoveHHi(Handle h);
pascal void HPurge(Handle h);
pascal OSErr HandToHand(Handle *theHndl);
pascal OSErr PtrToHand(const void *srcPtr,Handle *dstHndl,long size);
pascal OSErr HandAndHand(Handle hand1,Handle hand2);
pascal OSErr PtrAndHand(const void *ptr1,Handle hand2,long size);
#define DisposeHandle DisposHandle
#define DisposePtr DisposPtr
// Misc.
HWND GetMainWnd(void); // returns Premiere's main window
// use GetLastActivePopup(GetMainWnd())
// for any plugin dialog parents
// PWorld/PPix Utils
PPixHand GetPWorldBits(PWorldID pw);
void PPixToScreen(PPixHand pix, HDC dc, LPRECT drawrect, LPRECT theRect);
char NewPWorld(PWorldID *pwID, LPRECT bounds);
void DisposePWorld(PWorldID pw);
//-------------------------------------------------------------------------------------
// Data exporter definitions
//══════════════════════════════════════
// Data Export Data Structure
enum {
aflag5KHz = 0x0001,
aflag11KHz = 0x0002,
aflag22KHz = 0x0004,
aflag44KHz = 0x0008,
aflagSpecial = 0x0040,
aflagStereo = 0x0100,
aflag16Bit = 0x0200,
aflagDropFrame = 0x0400,
};
// Callback to get one frame of video
typedef short (CALLBACK *GetVidCallBack)(long frame, PWorldID thePort, LPRECT theBox, LPVOID privateData);
// Callback to get one second of audio
typedef short (CALLBACK *GetAudCallBack)(long second, short formatFlags, LPSTR buffer, LPVOID privateData);
typedef struct {
long markers[12]; // clip markers
long numframes; // number of frames in the clip
short framerate; // frames per second of source material
RECT bounds; // the video bounding frame, empty if no video
short audflags; // the audio flags (above), zero if no audio
long audrate; // the audio rate in Hz
GetVidCallBack getVideo; // video reader callback
GetAudCallBack getAudio; // audio reader callback
Handle privateData; // private data passed to above routines
long specialRate; // special rate
} DataExportRec, **DataExportHandle;
enum {
edExecute = 0,
};
// Exported call to get full path of exported file.
void GetExportFilePath(DataExportHandle datahand, LPSTR path);
#define mExpVid 0x8000 // for vid exports
#define mExpAud 0x4000 // for aud exports
//-------------------------------------------------------------------------------------
// EDL exporter definitions
//-------------------------------------------------------------------------------------
// Header definition for data blocks
//
// Blocks passed to an export module have a header followed by any
// static data, then any sub-blocks, which themselves have
// headers, static data, and sub-blocks...
typedef struct {
long size; // total size of this block, including static data and sub-blocks
long dataSize; // the static data size for this block
long type; // the block type (basically, an OSType)
long theID; // the block ID, for blocks which do not need an ID, 0 is used
} BlockRec;
// These are the routines used to take apart data blocks
long CountTypeBlocks(long type, BlockRec *srcBlock);
BlockRec *FindBlock(long type, long theID, long index, BlockRec *srcBlock);
BlockRec **GetBlock(long type, long theID, long index, BlockRec **srcBlock);
void ExtractBlockData(BlockRec *srcBlock, void *destination, long *maxlen);
// These are the track ID's
enum {
tVideoA = 0,
tVideoB,
tVideoSuper,
tFX1,
tAudioA,
tAudioB,
tAudioC
};
#define FOURCC( ch0, ch1, ch2, ch3 ) \
( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
#define BLOKblok FOURCC('B','L','O','K')
#define TRKBblok FOURCC('T','R','K','B')
#define TRAKblok FOURCC('T','R','A','K')
#define FVIDblok FOURCC('F','V','I','D')
#define FSUPblok FOURCC('F','S','U','P')
#define FAUDblok FOURCC('F','A','U','D')
#define AMAPblok FOURCC('A','M','A','P')
#define FF_Xblok FOURCC('F','F','_','X')
#define TRECblok FOURCC('T','R','E','C')
#define RBNDblok FOURCC('R','B','N','D')
#define RPNTblok FOURCC('R','P','N','T')
#define FXOPblok FOURCC('F','X','O','P')
#define FXDFblok FOURCC('F','X','D','F')
#define EDGEblok FOURCC('E','D','G','E')
#define MPNTblok FOURCC('M','P','N','T')
#define SPNTblok FOURCC('S','P','N','T')
#define EPNTblok FOURCC('E','P','N','T')
#define OVERblok FOURCC('O','V','E','R')
#define COLRblok FOURCC('C','O','L','R')
#define SIMIblok FOURCC('S','I','M','I')
#define BLNDblok FOURCC('B','L','N','D')
#define THRSblok FOURCC('T','H','R','S')
#define CUTOblok FOURCC('C','U','T','O')
#define ALIAblok FOURCC('A','L','I','A')
#define SHADblok FOURCC('S','H','A','D')
#define RVRSblok FOURCC('R','V','R','S')
#define GARBblok FOURCC('G','A','R','B')
#define PONTblok FOURCC('P','O','N','T')
#define MATIblok FOURCC('M','A','T','I')
#define VFLTblok FOURCC('V','F','L','T')
#define AFLTblok FOURCC('A','F','L','T')
#define FILTblok FOURCC('F','I','L','T')
#define MOTNblok FOURCC('M','O','T','N')
#define SMTHblok FOURCC('S','M','T','H')
#define MRECblok FOURCC('M','R','E','C')
#define DATAblok FOURCC('D','A','T','A')
#define CLPBblok FOURCC('C','L','P','B')
#define CLIPblok FOURCC('C','L','I','P')
#define MARKblok FOURCC('M','A','R','K')
#define LOCKblok FOURCC('L','O','C','K')
#define RATEblok FOURCC('R','A','T','E')
#define FILBblok FOURCC('F','I','L','B')
#define FILEblok FOURCC('F','I','L','E')
#define MACSblok FOURCC('M','A','C','S')
#define MACPblok FOURCC('M','A','C','P')
#define DOSFblok FOURCC('D','O','S','F')
#define FRMSblok FOURCC('F','R','M','S')
#define VIDIblok FOURCC('V','I','D','I')
#define AUDIblok FOURCC('A','U','D','I')
#define TIMCblok FOURCC('T','I','M','C')
#define TIMBblok FOURCC('T','I','M','B')
#define REELblok FOURCC('R','E','E','L')
// These are the currently defined block types
// Type ID Parent Data Description
// -------- ------ ---------- ---------------------------------- --------------------------------
#define bBLOK BLOKblok // 0 none (L)wrk strt, (L)wrk end, sub-blks Container for everything
#define bTRKB TRKBblok // 0 BLOK track blocks Container for all of the tracks
#define bTRAK TRAKblok // ID TRKB (S)flags, TREC blocks Contains all of the blocks for an entire track
#define bFVID FVIDblok // 0 TRAK none indicates that a track contains video records
#define bFSUP FSUPblok // 0 TRAK none indicates that a track contains superimpose records
#define bFAUD FAUDblok // 0 TRAK none indicates that a track contains audio records
#define bAMAP AMAPblok // 0 FAUD (S)mapping bits bits indicate target tracks
#define bFF_X FF_Xblok // 0 TRAK none indicates that a track contains F/X records
#define bTREC TRECblok // n TRAK (S)clipID,(L)strt,(L)end,sub-blocks Contains the blocks for a single track item
#define bRBND RBNDblok // 0 TREC (S)max, RPNT blocks [optional] The rubber band info for a track item
#define bRPNT RPNTblok // 0-n RBND (L)h, (S)v rubber band point
#define bFXOP FXOPblok // 0 TREC (C)crnr,(C)dir,(S)strt,(S)end,blks [optional] The options controlling F/X options
#define bFXDF FXDFblok // 0 FXOP OSType the base type of the effect
#define bEDGE EDGEblok // 0 FXOP (S)thickness, COLR block [optional] describes edge thickness
#define bMPNT MPNTblok // 0 FXOP Point [optional] reference point for next to types
#define bSPNT SPNTblok // 0 FXOP Point [optional] user specified open point
#define bEPNT EPNTblok // 0 FXOP Point [optional] user specified close point
#define bOVER OVERblok // 0 TREC (S)type, info blocks [optional] The parameters for an overlay item
#define bCOLR COLRblok // 0 OVER,FILE RGBColor [optional] key or fill color
#define bSIMI SIMIblok // 0 OVER (S)similarity [optional] similarity value
#define bBLND BLNDblok // 0 OVER (S)blend [optional] blend value
#define bTHRS THRSblok // 0 OVER (S)threshold [optional] threshold value
#define bCUTO CUTOblok // 0 OVER (S)cutoff [optional] cutoff value
#define bALIA ALIAblok // 0 OVER (S)level [optional] anti-aliasing level
#define bSHAD SHADblok // 0 OVER none [optional] if present, shadowing is on
#define bRVRS RVRSblok // 0 OVER none [optional] if present, key is reversed
#define bGARB GARBblok // 0 OVER (R)ref rect,point blocks garbage matte points
#define bPONT PONTblok // 0-n GARB,RBND Point
#define bMATI MATIblok // 0 OVER (S)clipID [optional] The ID of the clip describing an overlay Matte
#define bVFLT VFLTblok // 0 TREC sub-blocks [optional] followed by individual filter blocks
#define bAFLT AFLTblok // 0 TREC sub-blocks [optional] followed by individual filter blocks
#define bFILT FILTblok // 0-n VFLT,AFLT (S)fileID,data block The (short) fileID, followed by a variable amount of data
#define bMOTN MOTNblok // 0 TREC (R)ref rect,sub blocks [optional] A record describing the motion path for a track item
#define bSMTH SMTHblok // 0 MOTN none If present, motion path is smoothed
#define bMREC MRECblok // 0-n MOTN (S)zoom,(P)spot,(P)dest[4] describes each motion point
#define bDATA DATAblok // 0 any data block [optional]generic data block, for storing parameter handles
#define bCLPB CLPBblok // 0 BLOK clip blocks Contains all of the clip blocks
#define bCLIP CLIPblok // ID CLPB (S)fileID,(L)in,(L)out the descriptive info for a clip
#define bMARK MARKblok // 0-9 CLIP (L)location [optional] For set markers, defines the markers
#define bLOCK LOCKblok // 0 CLIP none [optional] If present, clip has locked aspect
#define bRATE RATEblok // 0 CLIP (S)rate * 100 [optional] Defines a rate other than 1.00
#define bFILB FILBblok // 0 BLOK file blocks Contains all of the file blocks
#define bFILE FILEblok // ID FILB info blocks the descriptive blocks for a file
#define bMACS MACSblok // 0 FILE FSSpec the mac file spec
#define bMACP MACPblok // 0 FILE string the full mac pathname
#define bDOSF DOSFblok // 0 FILE string the full DOS file and path
#define bFRMS FRMSblok // 0 FILE (L)#frames [optional] number of frames for a file w/content
#define bVIDI VIDIblok // 0 FILE (L)video frame,(S)depth [optional] Describes the video portion of the file
#define bAUDI AUDIblok // 0 FILE (S)aud flags,(L)aud rate [optional] Describes the audio portion of the file
#define bTIMC TIMCblok // 0 FILE timecode [optional] Specifies the timecode for the first file frame
#define bTIMB TIMBblok // 0 FILE (L)frame,(C)dropframe,(C)format [optional] Specifies the binary timecode, as above
#define bREEL REELblok // 0 FILE (STR)reel name [optional] String describing the source reel for the file
// These are the structures for the static data for several of the blocks
typedef struct {
long start; // starting position for the work area
long end; // ending position for the work area
} Rec_BLOK;
typedef struct {
short fileID; // the dependent file ID
long in; // the IN point within the source material
long out; // the OUT point within the source material minus 1
} Rec_CLIP;
typedef struct {
short clipID; // the dependent clip ID
long start; // the clip starting position
long end; // the clip ending position
} Rec_TREC;
typedef struct {
short zoom; // zoom factor 1 to 400, 100 is normal
short time; // time location 1 to 1000
short rotation; // rotation factor -360 to 360, 0 is normal
short delay; // delay factor 0 to 100, 0 is normal
POINT spot; // the center point for the image at this point
} Rec_MREC;
typedef struct {
unsigned char corners; // the 'corner' flags, one bit each, from the user settings for the effect
char direction; // the direction flag, 0= A-->B, 1=B-->A
short startPercent; // starting percentage times 100
short endPercent; // ending percentage times 100
} Rec_FXOP;
typedef struct {
long h;
short v;
} Rec_RPNT;
typedef struct {
RECT frame; // bounding frame for video data
short depth; // bit depth for video data
} Rec_VIDI;
typedef struct {
long frames; // binary frame count
char dropframe; // true = DF, false = NDF
char format; // true = NTSC(30), false = PAL(25), 2=Film(24)
} Rec_TIMB;
#define DISSblok FOURCC('D','I','S','S')
#define TAKEblok FOURCC('T','A','K','E')
#define WI00blok FOURCC('W','I','0','0')
#define WI01blok FOURCC('W','I','0','1')
#define WI02blok FOURCC('W','I','0','2')
#define WI03blok FOURCC('W','I','0','3')
#define WI04blok FOURCC('W','I','0','4')
#define WI05blok FOURCC('W','I','0','5')
#define WI06blok FOURCC('W','I','0','6')
#define WI07blok FOURCC('W','I','0','7')
#define WI08blok FOURCC('W','I','0','8')
#define WI09blok FOURCC('W','I','0','9')
#define WI10blok FOURCC('W','I','1','0')
#define WI11blok FOURCC('W','I','1','1')
#define WI12blok FOURCC('W','I','1','2')
#define WI13blok FOURCC('W','I','1','3')
#define WI14blok FOURCC('W','I','1','4')
#define WI15blok FOURCC('W','I','1','5')
#define WI16blok FOURCC('W','I','1','6')
// These are the basic effect types, each effect falls back to one of these
#define fDISS DISSblok // cross dissolve
#define fTAKE TAKEblok // 'take' or cut
#define fWI00 WI00blok // vertical wipe from the left edge
#define fWI01 WI01blok // horizontal wipe from the top edge
#define fWI02 WI02blok // vertical wipe from the right edge
#define fWI03 WI03blok // horizontal wipe from the bottom edge
#define fWI04 WI04blok // diagonal wipe from upper left corner
#define fWI05 WI05blok // diagonal wipe from upper right corner
#define fWI06 WI06blok // diagonal wipe from lower right corner
#define fWI07 WI07blok // diagonal wipe from lower left corner
#define fWI08 WI08blok // vertical split wipe
#define fWI09 WI09blok // horizontal split wipe
#define fWI10 WI10blok // horizontal/vertical split wipe
#define fWI11 WI11blok // box wipe out from the center
#define fWI12 WI12blok // circular wipe from the center
#define fWI13 WI13blok // inset wipe from upper left
#define fWI14 WI14blok // inset wipe from upper right
#define fWI15 WI15blok // inset wipe from lower right
#define fWI16 WI16blok // inset wipe from lower left
// EDL Export Data Structure
typedef struct {
Handle dataHandle; // data handle
short timeBase; // current default timebase
Ptr projectName; // pointer to current project name
} ExportRecord, **ExportHandle;
// Selector messages
enum {
exExecute = 0,
exTrue30fps,
};
// 'EDLE'
//#define EDLEtype 0x45444c45L
//#define TEXTtype 0x54455854L
///-----------
enum{
openErr = -23, /*I/O System Errors*/
nsvErr = -35, /*no such volume*/
ioErr = -36, /*I/O error (bummers)*/
eofErr = -39, /*End of file*/
tmfoErr = -42, /*too many files open*/
fnfErr = -43, /*File not found*/
wPrErr = -44, /*diskette is write protected.*/
dupFNErr = -48, /*duplicate filename (rename)*/
permErr = -54, /*permissions error (on file open)*/
fsRnErr = -59, /*file system internal error:during rename the old entry was deleted but could not be restored.*/
memFullErr = -108, /*Not enough room in heap zone*/
nilHandleErr = -109, /*Master Pointer was NIL in HandleZone or other*/
dirNFErr = -120, /*Directory not found*/
badExtResource = -185, /*extended resource has a bad format.*/
resNotFound = -192, /*Resource not found*/
fBsyErr = -47, /*File is busy (delete)*/
memWZErr = -111
};
#define VFlttype 0x56466c74L // This indicates an audio filter
#define AFlttype 0x41466c74L // This indicates an audio filter
#define SPFXtype 0x53504658L
#define PICTtype 0x50494354L
#define PICStype 0x50494353L
#define DRAWtype 0x44524157L
//══════════════════════════════════════
// XREF structures - used to translate a file type the HDLR or Draw type
#define xfCanOpen 0x8000
#define xfCanImport 0x4000
#define xfCanReplace 0x2000
#define xfUsesFiles 0x1000
#define xfIsEffect 0x0080
#define xfIsAFilter 0x0040
#define xfIsVFilter 0x0020
#define xfIsStill 0x0010
#define xfIsMovie 0x0008
#define xfIsSound 0x0004
#define xfIsAnimation 0x0002
#define xfTypes 0x03FF